﻿<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:model="clr-namespace:XamarinFormsSample.Model;assembly=XamarinFormsXamlSample"
             x:Class="XamarinFormsXamlSample.LoginPage">

  <ContentPage.Resources>
    <ResourceDictionary>
      <model:LoginInfo x:Key="credentials" />
    </ResourceDictionary>
  </ContentPage.Resources>

  <StackLayout VerticalOptions="Center"
               BindingContext="{StaticResource credentials}">
    
    <Entry Text="{Binding UserName}"
           Placeholder="User Name" />

    <Entry Text="{Binding Password}"
           IsPassword="true"
           Placeholder="Password" />

    <Button Text="Login"
            BorderRadius="5"
            TextColor="White"
            BackgroundColor ="{Binding LoginButtonColour}"
            IsEnabled="{Binding CanLogin}"
            Clicked="LogMeIn" />
    
  </StackLayout>
  
</ContentPage>